cmake_minimum_required(VERSION 2.8)

# CMakeLists variables
# Indirection lvl to the root of the project
set(INDIRECTION_LVL ${CMAKE_CURRENT_SOURCE_DIR}/../..)
set(DEPENDENCY_PATH ${INDIRECTION_LVL}/Dependencies)

# Project settings
set(serialization PROJECT_NAME)

# Compilation option
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11 -Wno-reorder -Wno-switch-enum")
elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
endif ()


set(HEADERS
	BinaryFileTreeDataBase.classdef.h
	BinaryFileTreeDataBase.h
	BinaryFileTreeDataStateBase.h
	BinaryFileTreeNode.classdef.h
	BinaryFileTreeNode.h
	BinaryPackageDataBase.classdef.h
	BinaryPackageDataBase.h
	BinaryPackageDataStateBase.h
	BinaryPackageNode.classdef.h
	BinaryPackageNode.h
	Bundle.classdef.h
	Bundle.h
	BundleDataBase.classdef.h
	BundleDataBase.h
	BundleNode.classdef.h
	BundleNode.h
	DataBase.classdef.h
	DataBase.h
	DataStateBase.classdef.h
	DataStateBase.h
	DataTypeManager.h
	DefaultNode.classdef.h
	DefaultNode.h
	FileTreeDataBase.classdef.h
	FileTreeDataBase.h
	FileTreeDataStateBase.h
	FileTreeNode.classdef.h
	FileTreeNode.h
	Node.classdef.h
	Node.h
	PackageDataBase.classdef.h
	PackageDataBase.h
	PackageDataBaseBuffer.h
	PackageDataStateBase.h
	PackageNode.classdef.h
	PackageNode.h
	SubDataManager.classdef.h
	SubDataManager.h
	Trashbin.classdef.h
	Trashbin.h
	XmlFileTreeDataBase.classdef.h
	XmlFileTreeDataBase.h
	XmlFileTreeDataStateBase.h
	XmlFileTreeNode.classdef.h
	XmlFileTreeNode.h
	)

set(SOURCES
	BinaryFileTreeDataBase.cpp
	BinaryFileTreeDataStateBase.cpp
	BinaryFileTreeNode.cpp
	BinaryPackageDataBase.cpp
	BinaryPackageDataStateBase.cpp
	BinaryPackageNode.cpp
	Bundle.cpp
	BundleDataBase.cpp
	BundleNode.cpp
	DataBase.cpp
	DataStateBase.cpp
	DataTypeManager.cpp
	DefaultNode.cpp
	FileTreeDataBase.cpp
	FileTreeDataStateBase.cpp
	FileTreeNode.cpp
	Node.cpp
	PackageDataBase.cpp
	PackageDataBaseBuffer.cpp
	PackageDataStateBase.cpp
	PackageNode.cpp
	SubDataManager.cpp
	Trashbin.cpp
	XmlFileTreeDataBase.cpp
	XmlFileTreeDataStateBase.cpp
	XmlFileTreeNode.cpp
	)

source_group("" FILES ${HEADERS} ${SOURCES})

add_library(${LIB_NAME} STATIC ${HEADERS} ${SOURCES})
